package com.study.d7_otherstream;

import java.io.PrintWriter;

public class PrintDemo {
    public static void main(String[] args) {
        //打印流可以实现更方便，更高效的打印出去，能实现打印啥出去就是啥
        try (
                //功能一样
//                PrintStream ps = new PrintStream("day10/src/print.txt");
                PrintWriter ps = new PrintWriter("day10/src/print.txt");
        ) {
                ps.println(666);
                ps.println(97);
                ps.println(97.9);
                ps.println('a');
                ps.println(true);
                ps.println("黑马帅气");
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
